<div id="middle">
    <div class="home_banner">
        <?php
        if (is_active_sidebar('home-ads-first-place')) :
            dynamic_sidebar('home-ads-first-place');
        endif;
        ?>
    </div>
    <div id="last_news">
        <h2><?php _e('ព័ត៌មាន​ថ្មី', 'health') ?></h2>
        <?php
        include_once 'slideshow.php';
        ?>
    </div> <!-- #last_news -->
    <?php
    query_posts('showposts=10');
    $i = 1;
    $new_articles = '';
    $other_articles = '';
    while (have_posts()) {
        the_post();


        if ($i <= 5) {

            $new_articles .= '<div class="articles">';
            //$new_articles .= '<div class="post_pic">';
            //$new_articles .= get_the_post_thumbnail(null, 'sub-sumb');  
            //$new_articles .= '</div>'; //photo_pic
            //$new_articles .= '<div class="post_desc">';
            $new_articles .= '<h3><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
            $new_articles .= '<a href="' . get_permalink() . '">' . get_the_post_thumbnail(null, 'sub-sumb') . '</a>';
            $new_articles .= '<p>' . get_the_excerpt() . '...(<a href="' . get_permalink() . '">អានលម្អិត</a>)</p>';
            // $new_articles .= '</div>'; //post_desc
            $new_articles .= '</div>'; //end articl
        } else {
            $other_articles .= '<div class="articles">';
            //$other_articles .= '<div class="post_pic">';
            //$other_articles .= get_the_post_thumbnail(null, 'sub-sumb');  
            //$other_articles .= '</div>'; //photo_pic
            //$other_articles .= '<div class="post_desc">';
            $other_articles .= '<h3><a href="' . get_permalink() . '">' . get_the_title() . '</a></h3>';
            $other_articles .= '<a href="' . get_permalink() . '">' . get_the_post_thumbnail(null, 'sub-sumb') . '</a>';
            $other_articles .= '<p>' . get_the_excerpt() . '...(<a href="' . get_permalink() . '">អានលម្អិត</a>)</p>';
            //$other_articles .= '</div>'; //post_desc
            $other_articles .= '</div>'; //end articl
        }
        $i++;
    } //end while
    wp_reset_query();
    ?>

    <div class="home_banner middle">
        <?php
        if (is_active_sidebar('home-ads-second-place')) :
            dynamic_sidebar('home-ads-second-place');
        endif;
        ?>
    </div>
    <div id="news_category">
        <div class="col_one">
            <div class="box_nc">
                <h2><a href="<?php echo WP_HOME ?>/related-posts/">ចំណង​ជើង​អត្ថបទ​ផ្សេង</a> &raquo;</h2>
                <div class="box_content">
                    <?php echo $other_articles; ?>
                    <div class="more_articles">

                    </div>
                </div><!-- box content -->
            </div>
        </div>
        <div class="col_two">
            <div class="box_nc">
                <h2><a href="<?php echo WP_HOME ?>/recent-post/">អត្ថបទ​ថ្មីៗ</a> &raquo;</h2>
                <div class="box_content">
                    <?php echo $new_articles ?>

                </div> <!-- end box content -->
            </div>



        </div><!-- #col_two -->
        <div class="clearfix"></div>
        <div class="home_banner banner-bottom">
            <?php
            if (is_active_sidebar('home-ads-third-place')) :
                dynamic_sidebar('home-ads-third-place');
            endif;
            ?>
        </div>
    </div><!-- #news_category -->

</div><!-- #middle -->

